package com.hnevc.yourhealthmanager.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnevc.yourhealthmanager.dao.HealthUserMapper;
import com.hnevc.yourhealthmanager.entity.HealthUser;
import com.hnevc.yourhealthmanager.entity.SportMeta;
import com.hnevc.yourhealthmanager.dao.SportMetaMapper;
import com.hnevc.yourhealthmanager.service.SportMetaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SportMetaServiceImpl extends ServiceImpl<SportMetaMapper, SportMeta> implements SportMetaService {
    @Autowired
    SportMetaMapper sportMetaMapper;
    @Override
    public SportMeta updatePic(Integer id, String s) {
        SportMeta sportMeta= sportMetaMapper.selectById(id);
        sportMeta.setSportMetaImage(s);
        if(sportMetaMapper.updateById(sportMeta)>0){
            return sportMeta;
        }else{
            return null;
        }
    }
}
